import Mock from 'mockjs2'
import { builder, builderQueryResponse } from '../util'

const getModifyRequests = () => {
  var datas = []
  // var count = Math.round(Math.random() * 1000) % 10 + 1
  var count = 100
  for (let i = 1; i <= count; i++) {
    datas.push({
      id: i,
      city: 'city',
      name: 'name' + i,
      appStatus: Math.floor(Math.random() * 3) + 0
    })
  }
  return builderQueryResponse(datas)
}

const getModifyRequestDetails = (id) => {
  return builder({
    hospitalInfo: {}
  })
}

Mock.mock(/\/modify-requests\/[1-9][0-9]*$/, 'get', getModifyRequestDetails)
Mock.mock(/\/modify-requests[^/]\??\w*/, 'get', getModifyRequests)
